package com.wikilife.index.contract;

import com.oklib.base.CoreBaseModel;
import com.oklib.base.CoreBasePresenter;
import com.oklib.base.CoreBaseView;
import com.wikilife.index.model.IndexBanner;
import com.wikilife.index.model.IndexEntrance;
import com.wikilife.index.model.IndexRecommend;

import java.util.List;

import rx.Observable;

/**
 * Created by Damon.Han on 2017/2/21 0021.
 *
 * @author Damon
 */

public interface IndexContract {
    interface Model extends CoreBaseModel {
        /**
         * 获取banner数据
         *
         * @return
         */
        Observable<List<IndexBanner>> getBanner();

        /**
         * 获取首页入口数据
         *
         * @return
         */
        Observable<IndexEntrance> getEntrance();

        /**
         * 获取中间推荐信息
         *
         * @return
         */
        Observable<List<IndexRecommend>> getRecommends();


    }

    interface View extends CoreBaseView {
        void showIndexBanner(List<IndexBanner> indexBanners);

        void showIndexEntrance(List<IndexEntrance> indexEntrances);

        void showRecommends(List<IndexRecommend> indexRecommends);
    }

    abstract class Presenter extends CoreBasePresenter<Model, View> {
        public abstract void getBannerData();

        public abstract void getEntranceData();

        public abstract void getRecommendsData();
    }
}
